<html>
<head><meta charset="utf-8"><title>linking with lld · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/linking.20with.20lld.html">linking with lld</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="240432563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/linking%20with%20lld/near/240432563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kevin Tran <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/linking.20with.20lld.html#240432563">(May 27 2021 at 08:07)</a>:</h4>
<p>When building Rust programs, I use lld to make linking faster. Are there any problems with using lld when building rustc, and will it make builds faster? If the answers are no and yes, then what is the right way to enable lld? Is it <code>rust.lld</code>, <code>rust.use-lld</code> or something else?</p>



<a name="240433128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/linking%20with%20lld/near/240433128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jam1garner <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/linking.20with.20lld.html#240433128">(May 27 2021 at 08:13)</a>:</h4>
<p>I believe different linkers are used at different stages, especially when building additional rustc targets. I don't think rustc's build is link-time heavy, so I'm not sure you'd have much success. However <code>use-lld</code> would be what you want. <code>lld</code> is just whether or not to build <code>rust-lld</code> alongside your sysroot</p>



<a name="240465455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/linking%20with%20lld/near/240465455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/linking.20with.20lld.html#240465455">(May 27 2021 at 13:19)</a>:</h4>
<p>Well, rustc_driver is link-time heavy. But it's still less than the time taken by rustc_mir and rustc_query_impl</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>